// GiaoDich.h
#include <iostream>
#include <conio.h>
#include <string.h>
#include <windows.h>
#ifndef GiaoDich_H
#define GiaoDich_H
struct tGiaoDich
{
	char tenGiaoDich[20],moTa[50], thoiGianGiaoDich[20];
	//System.DateTime thoiGianGiaoDich;
	int soTienGiaoDich, soDuTrongTK;
};
struct tNode
{
	tGiaoDich giaoDich;
	struct tNode *next;
};
struct tListGiaoDich
{
	tNode *head,*tail;
	tListGiaoDich()
	{
         head = NULL;
         tail = NULL;
    }
};
// lop dinh nghia cac giao dich 
class GiaoDich
{
    public:
        GiaoDich()//khoi tao LIST giao dich
		{
			listGD.head = listGD.tail = NULL;
		}
		void KhoiTao(tListGiaoDich &list)
		{list.head = list.tail = NULL;}
		void InGiaoDich();
//		void InGiaoDich();
		void GiaoDichCuoi(int, tListGiaoDich &list);//in N so giao dich sau cung
		tNode *TaoGiaoDich(tGiaoDich giaoDich);
		void AddGiaoDich(int, int);
		int ChuyenKhoan();//type = 1
		int InHoaDon();//type = 2
		int InSaoKe();//type = 3
		int RutTien();//type = 4
    private:
		int idGiaoDich;
		int idTK;
		tListGiaoDich listGD ;
};
#ifndef DEFINE_G_GIAODICH
#define DEFINE_G_GIAODICH 1
static GiaoDich gGiaoDich; 
#else
extern GiaoDich gGiaoDich;
#endif
#endif 
// GiaoDich_H
